import {createStore} from 'vuex'
export default createStore({
	state:{
		statusBarHeight:10,
		titleBarWidth:350,
		titleBarHeight:40,
		menuButtonHeight:32,
		longitude: '114.250918',
		latitude: '30.545012',
		loginStatus:false,
		redirect:1,
		user:{
			id: '0',
			accountId:'',
			accountLabel:'',
			accountStatus:1,
			accountName:'',
			accountType:1,
			avatar:'http://mozhe.oss-cn-hangzhou.aliyuncs.com/mz/20240523/49927.jpg',
			nickname:'饮酒知冷暖',
			phone:'',
			realName: "王龙星",
			signature: "总有人会成为现在的我，那就让我来吧！"
		}
	},
	mutations:{
		setLogin(state,info){
			state.loginStatus = true
			state.user = info
		},
		logOut(state){
			state.loginStatus = false
			state.user.avatar = 'http://mozhe.oss-cn-hangzhou.aliyuncs.com/mz/20240523/49927.jpg'
			uni.clearStorageSync()
		},
		setStatusBarHeight(state,statusBarHeight){
			state.statusBarHeight = statusBarHeight
		},
		setWxHeader(state,wxHeader){
			state.statusBarHeight = wxHeader.statusBarHeight
			state.menuButtonHeight = wxHeader.menuButtonHeight
			state.titleBarWidth = wxHeader.titleBarWidth
			state.titleBarHeight = wxHeader.titleBarHeight
		},
		setItude(state,position){
			state.longitude = position.longitude
			state.latitude = position.latitude
		}
	}
})